package main

import "fmt"

func changeValue(p *int) {
	*p = 10
}

func swapValue(a, b *int) {
	var temp int
	temp = *a
	*a = *b
	*b = temp
}

func main() {
	var a int = 1
	changeValue(&a)
	fmt.Println(a)

	b := 1
	c := 2
	swapValue(&b, &c)
	fmt.Println(b, c)

	var p *int = &a
	fmt.Println(&a)
	fmt.Println(p)
	fmt.Println(&p)

	var pp **int
	pp = &p
	fmt.Println(pp)
}
